from lexer import*

arr = lex("""hello "HelloWorld" """)

def parser(plist):
    type_list = []  # contains type of data
    name_list = []  # value of data
    translate = []
    output = ""
    # new_output =""
    for i in range(0, len(plist)):
        type_list.append(plist[i][0])  
        name_list.append(plist[i][1])  

    for i in range (0, len(plist)):
        if type_list[i] == "variable": # checking for variable
            output = name_list[i]+ " = " +name_list[i+1] #translating the line 
        translate.append(output) #storing the translated line
    print output
    return output #returning the tranlation 

parser(arr)
